﻿using System;
using LoungeRepo.Contracts.EntityStore;

namespace LoungeRepo.DispatcherEntityStore
{
    internal class NullEntityStore : IEntityStore
    {
        public void Store(IStreamedEntity streamedEntity) { throw MissingDefaultEntityStoreException(); }
        public IStreamedEntity Load(string id, string partition) { throw MissingDefaultEntityStoreException(); }
        public void Delete(string id, string partition) { throw MissingDefaultEntityStoreException(); }
        public void Dispose() { }

        private Exception MissingDefaultEntityStoreException()
        {
            return new NotImplementedException("No default partition entity store registered with RegexDispatcherEntityStore!");
        }
    }
}
